home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / filestuf.lzh / FILESTUF.DOC < prev    next >
Text File  |  1990-08-22  |  10KB  |  213 lines

  1.                                 Filestuff v1.0
  2.                       Copyright (c)1990 by Bill Aycock
  3.  
  4.  
  5. Filestuff is an auto program that allows you to copy, rename, or delete
  6. files. Its actions can vary depending on keyboard input, the existence of
  7. a file, or the current screen resolution.
  8.  
  9. Filestuff is controlled by a script file consisting of standard ASCII
  10. text. Each line of the script must contain a single Filestuff command and
  11. end with a Return character; blank lines are not allowed.
  12.  
  13. Filestuff's default script (the script that is executed when Filestuff
  14. is run from the AUTO folder) must be named FILESTUF.CMD, and it must be
  15. located in the root directory of your boot drive. Filestuff may also be
  16. used as a .TTP program from the desktop; just pass the name of the script
  17. file you want Filestuff to execute, or no file name at all to run the
  18. default script.
  19.  
  20. If any errors occur during the execution of a script, you have the option
  21. of seeing an error message on the screen or branching in your script. You
  22. can also totally ignore any errors if you wish.
  23.  
  24. There are a few example Filestuff scripts in this ARC; take a look at
  25. them to see the sorts of things Filestuff can do. EXAMPLE*.CMD demonstrate
  26. most of the possible commands. DMGRKEYS.CMD shows a simple script that
  27. just displays a few lines of information on the screen. FILESTUF.CMD
  28. demonstrates the Transfer command, and allows you to run the example
  29. script. REAL.CMD is the script that I actually use - it lets me set up a
  30. specific Spectre GCR configuration file depending on which Mac partitions
  31. I want to have available.
  32.  
  33.  
  34.                    ***** GENERAL NOTES ON COMMANDS *****
  35.  
  36.  
  37. * Blanks or tabs must separate commands and parameters.
  38. * Remember to include the full drive and path specifications unless
  39.   you're dealing with files in the default folder.
  40. * Wildcards are acceptable, but only the first file matching the mask
  41.   will be affected.
  42. * Only the first letter of each command is significant; you don't need to
  43.   spell out the entire command (though you may if you wish).
  44. * Filestuff's COPY command is a one-pass copy routine - you won't be able
  45.   to copy a file larger than the copy buffer. Filestuff grabs all
  46.   available RAM for its buffer, so this shouldn't cause a problem unless
  47.   you try to copy a very large file. (See the ? command below.)
  48. * Unless you have a reason to do otherwise, you may want to include a
  49.   BUFFER command at the end of your script. This will clear the key buffer
  50.   before Filestuff ends, so extra keypresses won't interfere with the next
  51.   program to run. (But see DMGRKEYS.CMD for one example of a script where
  52.   you _wouldn't_ want to clear the key buffer.)
  53.  
  54.  
  55.                         ***** COMMAND LIST *****
  56.  
  57.  
  58. ? - Displays work area size in hex. The work area contains both the script
  59.   and the copy buffer. The largest file Filestuff can copy will be this
  60.   size minus the size of the current script. (Filestuff requires at least
  61.   a 2K work area, and also reserves 2K for the system.)
  62.  
  63. ; - A comment. Comments can also be added to the end of any command line.
  64.  
  65. QUIT - Stop processing and exit.
  66.  
  67. COPY file1 file2 - Read file1 into memory, then create and write file2.
  68.  
  69. DELETE file - Delete a file.
  70.  
  71. RENAME oldname newname - Rename a file. Note: if a file with the new name
  72.   already exists, you'll get an error!
  73.  
  74. ECHO - Controls the file-command echo. When it's on, the copy, delete,
  75.   rename and transfer command lines are displayed. Follow the ECHO
  76.   command with a + to turn the echo on, or a - to turn the echo off. If
  77.   neither a + nor a - follows the command, echo status is toggled.
  78.  
  79. SHOW text - Displays text on screen. The text includes everything from
  80.   the first character after the SHOW command through the Return at the end
  81.   of the line. If you want to get fancy, you can embed standard VT-52
  82.   control codes in your text - for example, include an ESCAPE-E in your
  83.   text to clear the screen and home the cursor. (The Flash edit buffer is
  84.   a good editor to use for preparing SHOW commands, since it displays the
  85.   ESC and other control characters.)
  86.  
  87. VIDEO - Inverse video toggle - prints SHOW text white on black. As for
  88.   the ECHO command, follow this with a + to turn on inverse video, a - to
  89.   restore normal video, or neither to toggle inverse video on or off.
  90.  
  91. WAIT n - Waits n seconds unconditionally. (0<=n<=255)
  92.  
  93. PAUSE n - Waits n seconds, but ends waiting if a key is pressed.
  94.   (0<=n<=255)
  95.  
  96. TRANSFER filename - Transfers control to a different script file. If
  97.   the specified file does not exist, this command is ignored.
  98.  
  99. @ n - A label. Labels must be numbers between 1 and 255 (e.g., "@ 9"
  100.   or "@ 255"). They don't need to be defined in numerical order. All
  101.   labels are interpreted before any commands are executed, so only the
  102.   LAST occurrence of a label counts. A jump to an undefined label is
  103.   ignored. Remember to include the space between the @ symbol and the
  104.   label number!
  105.  
  106. JUMP label - An unconditional branch; jumps to the specified label.
  107.   Note: DO NOT include the "@" symbol in ANY jump commands!
  108.  
  109. Z label - Jumps to label if the most recent copy, rename, or delete
  110.   operation caused an error. Note that this command does NOT set up an
  111.   automatic error routine - you need to explicitly check for errors with
  112.   the Z command! There is also a second form of this command -- if you
  113.   use a Z command with NOTHING ELSE on the command line (just a lone "Z"),
  114.   Filestuff will display an error message explaining what happened. If you
  115.   wish, you can use both forms of the command - a lone Z to show an error
  116.   message, then a Z LABEL to jump to a recovery routine. (Yeah, I know, Z
  117.   isn't a very good mnemonic...)
  118.  
  119. FEXISTS filespec label - Jumps to label if the specified file exists.
  120.  
  121. HIREZ label - Jumps to label if you're in high rez (monochrome).
  122.  
  123. LOWREZ label - Jumps to label if you're in low rez. One caution here: if
  124.   you use a program like Desk Manager to switch from low to medium
  125.   resolution _after_ Filestuff has run, you can end up in medium rez even
  126.   though your LOWREZ jump worked (since you were actually in low rez when
  127.   Filestuff ran). Be aware of this possibility if you need to set up some
  128.   file commands that depend on low or medium resolution.
  129.  
  130. MEDREZ label - Jumps to label if you're in medium rez.
  131.  
  132. KEYGET - Gets a keypress IF ONE IS WAITING. Note that this command WON'T
  133.   wait around for a key to be pressed! You'll normally use the PAUSE
  134.   command right before a KEYGET.
  135.  
  136. BUFFER - Clears the keypress buffer. Use this command before asking for
  137.   keyboard input to make sure you don't read an "old" keypress.
  138.  
  139. IFKEY value label - Jumps to label if the keypress from a KEYGET
  140.   matches the specified value. "Value" can be a letter or a digit, or a
  141.   special value indicated by a slash:
  142.       "//" matches the slash character
  143.       "/1" to "/0" match function keys f1-f10 (note, "/0"=f10)
  144.             also note, shift is ignored for the function keys!
  145.       "/help" matches the HELP key
  146.       "/return" matches both the RETURN and ENTER keys
  147.       "/space" matches the SPACE character
  148.       "/undo" matches the UNDO key
  149.       "/any" matches _any_ keypress
  150.       "/none" means NO KEYPRESS IS WAITING (no key was pressed)
  151.   As with commands, only the first character after the slash is important.
  152.   No special provision is made for shift, control, or alternate keys;
  153.   except for the special keys above, you can only check for standard ASCII
  154.   characters. A test for an undefined special key (i.e., slash followed by
  155.   some character not listed above) is treated like a test for a slash.
  156.  
  157.  
  158.                           ***** CREDITS *****
  159.  
  160.  
  161. Filestuff was written in 100% assembly language using the DevpacST
  162. assembler. The string routines used are from a library written in
  163. conjunction with Robert Birmingham. The latest version of Filestuff can
  164. always be found on Compuserve's Atari Productivity Forum (GO ATARIPRO at
  165. any ! prompt). If you have any questions, comments, or suggestions, the
  166. fastest way to get a response is to leave me a mes